package cn.ffcs.contract.dao;

import java.util.List;

import org.echoice.hibernate.EntityDao;
import org.echoice.paper.PageBean;

import cn.ffcs.bpm.model.ProcTranRecord;
import cn.ffcs.bpmpvc.model.BpmAppInfo;
import cn.ffcs.bpmpvc.svc.TaskAssignBean;
import cn.ffcs.contract.model.ContractBussout;
import cn.ffcs.contract.model.ContractInfo;
import cn.ffcs.contract.model.ContractRemind;
import cn.ffcs.contract.web.view.ContractBussoutView;
import cn.ffcs.organ.model.Person;

public interface ContractRemindDao extends EntityDao<ContractRemind> {
	/**
	 * 查找到期的提醒设置
	 * @return
	 */
	public List<ContractRemind> findCurrentList();
	/**
	 * 
	 * @return
	 */
	public List<ContractRemind> findCurrentListNew();
	/**
	 * 取得三个月到期的合同列表
	 * @return
	 */
	public List<BpmAppInfo> findDue3MonthContractList();
	/**
	 * 更新到期三个月合同提醒标识
	 * @param id
	 * @param isRemind
	 * @return
	 */
	public int updateDue3MonthRemind(String id,String isRemind);
	/**
	 * 根据合同ID，取得约束设置
	 * @param ContractId
	 * @return
	 */
	public List<ContractRemind> findListByContractId(String ContractId);
	/**
	 * 
	 * @param id
	 * @param isDo
	 * @param procinstId
	 * @return
	 */
	public int updateRemind(String id,String isDo,String procinstId);
	/**
	 * 根据流程实例ID，取得合同约束
	 * @param procinstId
	 * @return
	 */
	public ContractRemind getByProcinstId(String procinstId);
	/**
	 * 根据合同ID，取得记录信息
	 * @param id
	 * @return
	 */
	public ContractInfo getById(Integer id);
	/**
	 * 批量保存提醒
	 * @param contractRemindlist
	 * @param contractId
	 */
	public void saveRemind(List<ContractRemind> contractRemindlist,String contractId);
	/**
	 * 批量保存或修改
	 * @param list
	 */
	public void saveOrUpdateRemind(List<ContractRemind> list);
	/**
	 * 得到一下提醒时间
	 * @param contractId
	 * @return
	 */
	public ContractRemind getNextRemind(ContractRemind curContractRemind);
	/**
	 * 查询可进行业务退出的合同
	 * @param searchForm
	 * @param pageNo
	 * @param pageSize
	 * @return
	 */
	public PageBean findValidContractPage(ContractInfo searchForm,int pageNo,int pageSize);
	/**
	 * 查询业务退出合同流程列表
	 * @param searchForm
	 * @param pageNo
	 * @param pageSize
	 * @return
	 */
	public PageBean findContractBussOutPage(ContractBussoutView searchForm,int pageNo,int pageSize);
	
	public ContractBussout getContractBussout(String proInstId);
}
